//-----------------------------------------------------------------------
// <copyright file="TupleStoreExceptionHelper.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the TupleStoreExceptionHelper class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Tuples.Exceptions
{
    using System;

    /// <summary>
    /// Helper class for throwing exceptions.
    /// </summary>
    internal static class TupleStoreExceptionHelper
    {
        /// <summary>
        /// Throw a TupleImmutabilityException exception for ExTupleStoreTupleImmutable.
        /// </summary>
        public static void ThrowTupleStoreExTupleImmutable()
        {
            throw new TupleImmutabilityException(Properties.Resources.ExTupleStoreTupleImmutable);
        }

        /// <summary>
        /// Throw a TupleStoreSessionException exception for ExTupleStoreCtxSwchFailed.
        /// </summary>
        /// <returns>Dummy return.</returns>
        public static string ThrowTupleStoreExCtxSwchFailed()
        {
            throw new TupleStoreSessionException(Properties.Resources.ExTupleStoreCtxSwchFailed);
        }

        /// <summary>
        /// Throw a TupleUninitializedException exception for ExTupleStoreTupleUninitAssert.
        /// </summary>
        public static void ThrowTupleStorePbUninitAssert()
        {
            throw new TupleUninitializedException(Properties.Resources.ExTupleStoreTupleUninitAssert);
        }

        /// <summary>
        /// Throw a TupleUninitializedException exception for ExTupleStoreTupleUninitRetract.
        /// </summary>
        public static void ThrowTupleStorePbUninitRetract()
        {
            throw new TupleUninitializedException(Properties.Resources.ExTupleStoreTupleUninitRetract);
        }

        /// <summary>
        /// Throw a EntityTupleNotRegisteredException exception for ExTupleStoreTupleNotRegRetract.
        /// </summary>
        public static void ThrowTupleStorePbNotRegRetract()
        {
            throw new EntityTupleNotRegisteredException(Properties.Resources.ExTupleStoreTupleNotRegRetract);
        }

        /// <summary>
        /// Throw a ThrowTupleListSingleModeException exception for ExTupleListNotSingleMode.
        /// </summary>
        /// <returns>A ThrowTupleListSingleModeException exception.</returns>
        public static Tuples.Tuple ThrowTupleListSingleModeException()
        {
            throw new TupleListSingleModeException(Properties.Resources.ExTupleListNotSingleMode);
        }

        /// <summary>
        /// Throw a ArgumentNullException exception for ExTupleStoreRegNullBlist.
        /// </summary>
        public static void ThrowTupleStoreExRegNullBlist()
        {
            throw new ArgumentNullException(Properties.Resources.ExTupleStoreRegNullBlist);
        }

        /// <summary>
        /// Throw a ArgumentNullException exception for ExTupleStoreAddNullTuple.
        /// </summary>
        public static void ThrowTupleStoreExAddNullTuple()
        {
            throw new ArgumentNullException(Properties.Resources.ExTupleStoreAddNullTuple);
        }

        /// <summary>
        /// Throw a ArgumentNullException exception for ExTupleStoreFactTypeIsNull.
        /// </summary>
        public static void ThrowTupleStoreExFactTypeIsNull()
        {
            throw new ArgumentNullException(Properties.Resources.ArgFactType, Properties.Resources.ExTupleStoreFactTypeIsNull);
        }
    }
}
